<template>
  <div>
    <router-view />
  </div>
</template>

<script>
import { getToken } from "./util/validate.js";
import { mapActions, mapMutations } from "vuex";
import store from "@/store"
export default {
  created() {
    let token = getToken("saasToken");
    if (token) {
      this.setToken(token);
      this.getUserInfo();
    }
  },

  methods: {
    ...mapActions(["getUserInfo"]),
    ...mapMutations(["setToken"]),
  },
}
</script>
